package responsechain.handeler;

public class Interview {
    String name;
    int age;
    int sex;//0：男 1 女生
    boolean health; //算不算身体好
    int english;
    boolean canDrive;
    int average;

    public static InterviewBuilder builder() {
        return new InterviewBuilder();
    }

    @Override
    public String toString() {
        return "Interview{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", health=" + health +
                ", english=" + english +
                ", canDrive=" + canDrive +
                ", average=" + average +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public boolean isHealth() {
        return health;
    }

    public void setHealth(boolean health) {
        this.health = health;
    }

    public int getEnglish() {
        return english;
    }

    public void setEnglish(int english) {
        this.english = english;
    }

    public boolean isCanDrive() {
        return canDrive;
    }

    public void setCanDrive(boolean canDrive) {
        this.canDrive = canDrive;
    }

    public int getAverage() {
        return average;
    }

    public void setAverage(int average) {
        this.average = average;
    }

    public static class InterviewBuilder {
        Interview interview;

        InterviewBuilder() {
            interview = new Interview();
        }

        public InterviewBuilder age(int age) {
            interview.setAge(age);
            return this;
        }

        public InterviewBuilder name(String name) {
            interview.setName(name);
            return this;
        }

        public InterviewBuilder canDrive(boolean canDrive) {
            interview.setCanDrive(canDrive);
            return this;
        }

        public InterviewBuilder health(boolean health) {
            interview.setHealth(health);
            return this;
        }

        public InterviewBuilder average(int average) {
            interview.setAverage(average);
            return this;
        }

        public InterviewBuilder english(int english) {
            interview.setEnglish(english);
            return this;
        }

        public InterviewBuilder sex(int sex) {
            interview.setSex(sex);
            return this;
        }

        public Interview build() {
            return interview;
        }

    }
}
